﻿//  --------------------------------
//  Copyright (c) PK Logix LLC. All rights reserved.
//  This source code is made available under the terms of the GNU General Public License version 2 (GPLv2)
//  http://www.codeplex.com/mvcclubsite/license
//  ---------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MVCClubSite.Model;

namespace MVCClubSite.IDAL
{
    /// <summary>
    /// Interface for Images DAL
    /// </summary>
    public interface IImages
    {
        /// <summary>
        /// Method to get Images
        /// </summary>
        /// <returns>A list of Images</returns>
        IQueryable<Image> GetImages();

        /// <summary>
        /// Method to get an albums images
        /// </summary>
        /// <param name="id">ID of the album</param>
        /// <returns>A list of Images</returns>
        IQueryable<Image> GetImagesByAlbumID(int id);

        /// <summary>
        /// Method to get an image by id
        /// </summary>
        /// <param name="id">ID of the image to return</param>
        /// <returns>An image business entity</returns>
        Image GetImageByID(int id);

        /// <summary>
        /// Method to get an image id for an album thumbnail
        /// </summary>
        /// <param name="albumID">ID of the album</param>
        /// <returns>ID of the image</returns>
        int GetAlbumThumbnailID(int albumID);

        /// <summary>
        /// Method to insert or update an image
        /// </summary>
        /// <param name="image">Image to insert or update</param>
        void Save(Image image);

        /// <summary>
        /// Method to delete an image
        /// </summary>
        /// <param name="id"></param>
        void Delete(int id);

        /// <summary>
        /// Method to delete all images in an album
        /// </summary>
        /// <param name="ID">ID of the album</param>
        void DeleteByAlbumID(int albumID);
    }
}
